package ch.ti.bfh.app.loodel.domain.learningEvent;


import ch.ti.bfh.app.loodel.internal.repository.GlobalRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface LearningEventRepository extends GlobalRepository<LearningEvent, String> {

    @Query("Select event From LearningEvent As event join event.timeSlots AS timeSlot where timeSlot.id = :timeSlotId")
    public LearningEvent findLearningEventByTimeSlotId(@Param("timeSlotId") Long timeSlotId);

}
